home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Resources / Developers / XAMPP 1.5.4 / Windows installer / xampp-win32-1.5.4-installer.exe / xampp / contrib / soap.php < prev    next >
PHP Script  |  2005-09-04  |  648b  |  30 lines

  1. <?php
  2.     header("Content-Type: text/html; charset=utf-8;");
  3. ?>
  4. <html>
  5. <head>
  6. <title>PHP und SOAP</title>
  7. </head>
  8. <body>
  9. <?php
  10.  
  11.     $client = new SoapClient('http://api.google.com/GoogleSearch.wsdl');
  12.     
  13.     $apikey="apikey hier einsetzen";
  14.     $searchfor="xampp";
  15.  
  16.     $result = $client->doGoogleSearch($apikey, $searchfor, 0, 10, false, '', true, '', '', '');
  17.     
  18.     echo "Gefundene Seiten: ".$result->estimatedTotalResultsCount;
  19.  
  20.     echo "<ol>";
  21.     foreach ($result->resultElements as $hit) 
  22.     {
  23.         echo "<li><a href=\"".$hit->URL."\">".$hit->title."</a>";
  24.         echo "<br>".$hit->snippet;
  25.     }
  26.     echo "</ol>";
  27. ?>
  28. </body>
  29. </html>
  30.